package com.kai.steering.data.service.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kai.steering.data.service.entity.po.Warehouse;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.core.conditions.Wrapper;

import java.io.Serializable;
import java.util.List;

/**
 * <pre>
 * 仓库 Mapper 接口
 * </pre>
 *
 * @author kai
 * @since 2022-02-23
 */
@Repository
public interface WarehouseMapper extends BaseMapper<Warehouse> {

    /**
     * 根据ID获取查询对象
     *
     * @param id
     * @return
     */
    Warehouse getWarehouseById(Serializable id);

    /**
     * 获取分页对象
     *
     * @param page
     * @param queryWrapper
     * @return
     */
    IPage<Warehouse> getWarehousePageList(IPage<Warehouse> page, @Param(Constants.WRAPPER) Wrapper<Warehouse> queryWrapper);


    List<Warehouse> childWarehouse(String warehouseId);
}
